Stroke simulation and machine learning